package com.usian.controller;

import com.usian.pojo.TbItemCat;
import com.usian.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/service/itemCategory")
public class TbItemCarController {

    @Autowired
    private ItemService itemService;

    /**
     * 根据类目 ID 查询当前类目的子节点
     */
    @RequestMapping("selectItemCategoryByParentId")
    List<TbItemCat> selectItemCategoryByParentId(Integer id){
        return this.itemService.selectItemCategoryByParentId(id);
    }
}
